﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace Gemciler_Uretim.STOK
{
    public partial class GruplarTanimlari : DevExpress.XtraEditors.XtraForm
    {
        public GruplarTanimlari()
        {
            InitializeComponent();
        }
        public Int32 islemdevam = 1;
        public string secilen_kod,secilen_ad;
        public string sql_cumle;
        SqlConnecitonClass sqlbaglanti = new SqlConnecitonClass();
        private void GruplarTanimlari_Load(object sender, EventArgs e)
        {

            gridControl1.DataSource = sqlbaglanti.ShowTable(""+sql_cumle + "", CommandType.Text);
            this.gridControl1.TabIndex = 0;
            this.gridView1.OptionsBehavior.AllowIncrementalSearch = true;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            this.gridView1.OptionsBehavior.Editable = false;
            gridView1.BestFitColumns();
        }

        private void gridView1_DoubleClick(object sender, EventArgs e)
        {

            try
            {
                int index1 = gridView1.FocusedRowHandle;
                secilen_kod = Convert.ToString(gridView1.GetRowCellValue(index1, "KOD").ToString());
                secilen_ad = Convert.ToString(gridView1.GetRowCellValue(index1, "ADI").ToString());
                Close();
            }
            catch { }
            
        }
    }
}